package org.mybatis.model;

import java.io.Serializable;

public class ResultDo<T> implements Serializable {
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
    
    /**
     * 状态码 
     */
    private int code;
    /**
     * 消息
     */
    private String msg;
    /**
     * 数据
     */
    private T data;
    /**
     * 总记录数
     */
    private Integer count;
    
    public void count(long count) {
        this.count = new Long(count).intValue();
    }
    
    public void code(int code) {
        this.code = code;
    }
    
    public void msg(String msg) {
        this.msg = msg;
    }
    
    public void data(T data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public T getData() {
        return data;
    }

    public Integer getCount() {
        return count;
    }
}
